#include "sframe.h"

void SFrame::create_menu()
{
   Menu(this)
   << (Popup("&File")
      << Item("&New\tctrl-N",  (EH)do_new)
      << Item("&Open\tctrl-O",(EH)do_open)
      << Item("&Save\tctrl-S",(EH)do_save)
      << Item("Save &As",     (EH)do_save_as)
      << Item("&Reload\tctrl-R", (EH)do_reload)
      << Item("&Insert File",    (EH)do_insert_file)
      << Item("&Copy to File",   (EH)do_copy_file)
      << Item("Run &UnderC",             (EH)do_run_underc)
      << Sep()
      << Item("Files..",      (EH)do_files_list,m_files_used->start_id())
      << Sep()
      << Item("E&xit",        (EH)do_exit)
      )
   << (Popup("&View")
      << Item("Matching &Brace\tctrl-E",(EH)do_match_brace)
      << Item("Zoom &In\tctrl-+",(EH)do_zoom_in)
      << Item("Zoom &Out\tctrl-*",(EH)do_zoom_out)
      << Sep()
      << Item("Toggle &Bookmark\tctrl-F2",(EH)do_toggle_marker)
      << Item("Move to &Next Bookmark\tF2", (EH)do_goto_next_marker)
      << Sep()
      << Item("Show &Watch",(EH)do_show_watch)
      << Item("Show &Locals",(EH)do_show_locals)
      << Item("Show &Call Stack",(EH)do_show_call_stack)
      )
   << (Popup("&Edit")
      << Item("&Undo\tctrl-Z", (EH)do_undo)
      << Item("&Redo\tctrl-Y", (EH)do_redo)
      << Item("Cu&t\tctrl-X",  (EH)do_cut)
      << Item("&Copy\tctrl-C", (EH)do_copy)
      << Item("&Paste\tctrl-V",(EH)do_paste)
      << Item("&Operate on Selection", (EH)do_operate_on_selection)
      << Sep()
      << Item("&Find...\tctrl-F", (EH)do_find)
      << Item("Find &Next...\tF3",(EH)do_find_next)
      << Item("&Go to Line...\tctrl-G",(EH)do_goto_line)
      << Sep()
      << Item("E&xpand Macro...\talt-X", (EH)do_expand)
      )
   << (Popup("&Run")
      << Item("&Run\tF5",                (EH)do_run)
      << Item("&Compile\tF7",            (EH)do_compile)
      << Item("Compile &Function\tctrl-I",(EH)do_compile_function)
      << Item("&Parameters\talt-F7",     (EH)do_parameters)  
      << Item("&Insert Watch Var",       (EH)do_insert_watch_var)
      << Item("&Breakpoint\tF9",         (EH)do_toggle_breakpoint)
      << Item("Step &Into\tF11",         (EH)do_single_step)
      << Item("Step &Over\tF10",         (EH)do_step_over)
      << Item("Run &to Cursor\tctrl-F10",(EH)do_goto_cursor)
      << Item("&Stop Program\tshift-F5", (EH)do_stop)
      )
   << (Popup("&Options")
      << Item("&Reset\tF6",  (EH)do_update)
      << Item("Show &Line Numbers", (EH)do_line_nos)
      << Item("Show &Short Filenames",(EH)do_short_filenames)
      )
   << (Popup("&Windows")
      << Item("&Close File\tctrl-F4",(EH)do_close_view)
      << Item("Swap Source and Header\tctrl-F6",(EH)do_swap_header)
      << Item("Swap Last Two Views\talt-Left",(EH)do_swap_top)
      << Sep()
      << Item("&Windows...",(EH)do_windows,m_views_open->start_id())
      )
   << (Popup("&Help")
      << Item("About...",(EH)do_about)
      )
   ;

    set_popup_menu(ContextMenu(this)
     << Item("&Back",               (EH)do_swap_top)
     << Item("&Swap Source/Header", (EH)do_swap_header)
     << Item("&Open Document",      (EH)do_open_document)
     << Item("&Close File",         (EH)do_close_view)
     << Sep()
     << Item("&Undo",  (EH)do_undo)
     << Item("&Copy",  (EH)do_copy)
     << Item("&Paste", (EH)do_paste)
     << Item("Cu&t",   (EH)do_cut)
     << Item("Select &Function", (EH)do_select_function)
     )
   ;

}
